IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_SrvrInstncAlias_SrvrInstnc]') AND parent_object_id = OBJECT_ID(N'[dbo].[SrvrInstncAlias]'))
BEGIN
     ALTER TABLE [dbo].[SrvrInstncAlias] DROP CONSTRAINT [FK_SrvrInstncAlias_SrvrInstnc]
END
GO

ALTER TABLE [dbo].[SrvrInstncAlias] WITH CHECK ADD CONSTRAINT [FK_SrvrInstncAlias_SrvrInstnc] 
     FOREIGN KEY([SrvrInstncId]) REFERENCES [dbo].[SrvrInstnc] ([SrvrInstncId])
GO
